package com.ktjiaoyu.service.impl;

import com.ktjiaoyu.entity.SysUser;
import com.ktjiaoyu.mapper.SysUserMapper;
import com.ktjiaoyu.service.SysService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysServiceImpl implements SysService {
    private static final Logger LOGGER = LoggerFactory.getLogger(SysServiceImpl.class);
    @Autowired
    SysUserMapper sysUserMapper;

    @Override
    public boolean verifyOldPassword(Integer id, String oldPassword) throws Exception {
        return sysUserMapper.verifyOldPassword(id, oldPassword) > 0;
    }

    @Override
    public boolean changePassword(SysUser sysUser) {
        return sysUserMapper.changePassword(sysUser) > 0;
    }
}
